<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" @click="open()">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  components: {
    HelloWorld
  },
  methods: {
    open() {
      this.$message({
        message: 'hello',
        type: 'success'
      })
      this.$http.get('/api/users')
        .then((data) => {
          console.log(data);
        })
    },
  }
}
</script>
